package com.xhsj.user.pms.patent.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xhsj.user.pms.patent.domain.Opinion;
import com.xhsj.user.pms.patent.domain.OpinionsAndFile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface OpinionMapper extends BaseMapper<Opinion> {

    /**
     * 通过节点id和交底书id查询意见以及意见相关文件
     * @author 苏小林
     * @date 2020/2/25 17:37
     * @param: nodeIds
     * @param: disclosureId
     * @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     */
    List<Map<String, Object>> getTextAndFileByNodeIdsAndDisclosureId(@Param("list") List<String> list, @Param("disclosureId") String disclosureId);
    //当前用户所有的接收到的意见和回复的意见 和所有的审批意见
    List<Map<String, Object>> getAllOpinonAndFile(@Param("disclosureId") String disclosureId, @Param("userId") Long userId);

    List<OpinionsAndFile> getOpinions(@Param("disclosureId") String disclosureId);

    List<Map<String, Object>> getTextAndFileByNodeId(@Param("disclosureId") String disclosureId,
                                                     @Param("userId") String userId, @Param("patentFileId") String patentFileId);

    //  对此文件的评论
    List<Map<String, Object>> getTextAndFileByNodeIdsAndPatentFileId(@Param("list") List<String> list,
                                                                     @Param("disclosureId") String disclosureId,
                                                                     @Param("patentFileId") String patentFileId);

}